#include <i386/string.h>

char *strstr(const char *haystack, const char *needle) {
	int hlen;
	int nlen;

	hlen = strlen((char *)haystack);
	nlen = strlen((char *)needle);
	while (hlen >= nlen) {
		if (!memcmp(haystack, needle, nlen)) {
			return (char *)haystack;
		}

		haystack++;
		hlen--;
	}
	
	return 0;
}
